namespace ne   {

    export class Singleton{
        static getInstance<T extends {}>(this: new () => T): T {
            if(!(<any>this).instance){
                (<any>this).instance = new this();
            }
            return (<any>this).instance;
        }

        static destory<T extends {}>(this: new() => T){
            (<any>this).instance = null
        }
    }
}